package YAPclient.sound;

/**
 * This class has an enum of all the names of the sounds used in this game. These are linked to the class that actually plays the sound through the mixer.
 * To play a sound one only needs to know the sounds name and call the play method.
 * @author Daniel
 *
 */
public class SoundList {
	
	public static ISound[] sounds;
	
	public enum SoundName{
		playerLostLife, 
		startGame, 
		rotate,
		bounce,
		bounceBig, 
		bounceSmall;
		
		ISound sound;
		public int value;
		
		public static void setSounds(){
			for(int i=0; i<SoundName.values().length; i++){
				SoundName.values()[i].sound = sounds[i];
			}
		}
		
		public void play(){
			sound.play();
		}
		public void pause(){
			sound.pause();
		}
		public void clear(){
			sound.clear();
		}
		public void resume() {
			sound.resume();
		}
	}
}
